/*
 * Script used by the game page to generate forceClose
 * requests and receive responses
 * 
 * Author: Chris Casola
 */

/**
 * React to forceClose responses.
 */
function handleForceCloseResponse(response) {	
	/* Close the event if response is successful */
	if (response.success == "true") {
		alert('got successful force close response');
		window.dlEvent.closeEvent();
		window.frame.changeForm("addEdge");
	}
	else {
		alert('got failed force close response');
	}
}

/**
 * Object to hold a forceClose request
 */
function forceCloseRequest() {
	this.__XMLclass = "closeRequest";	
	this.id = sessionStorage['gameid'];
}
